Jump To:
Technical Q&As
Carbon is a set of APIs that enables C and C++ developers to take advantage of Mac OS X-specific features, including an advanced user interface tool kit, an efficient event-handling mechanism, the Quartz 2D graphics library, and multiprocessing support. In addition, other industry-standard C and C++ APIs are easily available to Carbon developers, providing access to such services as the OpenGL drawing system, the Mach microkernel, and BSD operating-system services. Because Carbon is a collection of C programming interfaces, developers can use virtually any Macintosh C development environment that supports PowerPC to build Carbon applications.

Carbon Resources
A guided introduction and learning path for developers new to Carbon.   Essential information for developers using procedural C.   Descriptions of procedural C programming interface elements.
Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Topic
Sort by
Date
The "/.vol" directory and "volfs" (HTML) ()
QA1113: Describes how the Carbon File Manager interacts with BSD via "volfs" and the "/.vol" directory.
File Management 2002-02-14
68K Open Transport Code on Power Macintoshes (HTML)
Deprecated - NW48: Explains why running Open Transport 68K code on a PowerPC may not always work.
Networking 1997-03-14
Aborting a OTConnect in Progress (HTML)
Deprecated - NW29: Describes the proper way to abort OTConnect, and why after calling OTSndDisconnect you may receive "kOTOutStateErr".
Networking 1996-05-14
Accessing File Control Blocks (HTML) ()
FL10: Shows how to access file control blocks correctly, reiterating not to access FCBs directly.
File Management 1999-10-05
Accessing HTTPS Proxy Settings (HTML) ()
QA1234: Describes how to programatically access Secure Web Proxy information.
Networking 2003-02-19
Adding a movie reference to a movie (HTML)
QA1376: Demonstrates how to add a reference for a movie to another movie
QuickTime 2004-09-16
Adding an automated Window menu to your application (HTML)
QA1080: Explains how to add an automated Window menu to your Carbon application.
Design Guidelines, Human Interface Toolbox 2001-10-30
aglChoosePixelFormat, The Inside Scoop (HTML)
OGL01: Describes the nuances of aglChoosePixelFormat, including specific information on multi-monitor support.
Graphics & Imaging 2000-04-03
Allocate and Disk Full Error (HTML) ()
FL12: Discusses a problem with AFP volumes displaying incorrect free space, and returning disk full errors.
File Management, Networking 1999-07-21
Animating the Cursor at VBL Time (HTML) ()
PS05: Describes animating the cursor under traditional Mac OS.
Process Management 1997-01-09
Appearance Versions (HTML) ()
TB39: Explains how to retrieve the Appearance Manager version and verify the compatibility with the Mac OS version.
Human Interface Toolbox 2000-07-15
Are the root control, the root view, and the content view the same entity? (HTML) ()
QA1214: Details the differences and similitudes between the root control, the root view, and the content view of windows.
Human Interface Toolbox 2002-11-12
Are there any OSStatus values I can use in my programs? (HTML)
OV02: Describes OSStatus values that generate errors without colliding with reserved Apple system values.
Design Guidelines 1999-11-22
Avoiding Kernel Event Conflicts (HTML)
QA1063: Documents the namespace for the vendor_code field of the kern_event_msg structure.
Process Management 2001-09-14
Avoiding Pauses When Looping Audio files with QuickTime (HTML)
QA1371: Demonstrates how to avoid pauses when looping audio files with QuickTime
Music & Audio 2004-09-08
Avoiding the -42 error with DiscRecording (HTML)
QA1292: Explains how to workaround the -42 error when using the DiscRecording API.
File Management 2004-05-25
Base-Derived async image codecs must implement ImageCodecQueueStarting and ImageCodecQueueStopping (HTML) ()
QA1157: Describes why base-derived codecs that set canAsync must implement ImageCodecQueueStarting and ImageCodecQueueStopping.
QuickTime 2002-07-09
BowelsOfTheMemoryManager (aka YourHeapIsProbablyCorrupt) (HTML) ()
Deprecated - ME05: What the symbol BowelsoftheMemoryManager means and the most probable cause of this symbol in MacsBug.
Data Management 2001-02-01
Bypassing AppendMenu's Meta-character Processing (HTML) ()
TB56: Explains how to bypass AppendMenu's meta-character processing and how to use AppendMenuItemText instead.
Human Interface Toolbox 1998-12-22
CalcCMask and SeedCFill in Carbon (HTML) ()
QD62: Explains how to use CalcCMask and SeedCFill in Carbon even though Carbon doesn't support OpenPort.
Graphics & Imaging 2000-11-08
Calling an AppleScript and providing parameters from an Application (HTML) ()
QA1111: Explains calling and providing parameter values to an AppleScript event handler from an application written in C.
AppleScript 2002-03-13
Calling AppleScript from an Application (HTML)
QA1026: Describes how to call an AppleScript from an application written in C.
Interapplication Communication 2001-04-10
Calling CloseOpenTransport When Writing an App (HTML) ()
Deprecated - NW36: Identifies a bug in Open Transport 1.1 which means your application must CloseOpenTransport before quitting.
Networking 1996-07-03
Can I have parameters of type typeHIRect instead of type typeQDRectangle in my kEventControlBoundsChanged message handler? (HTML) ()
QA1246: Details the automatic coercions between QuickDraw and Quartz types provided by the Carbon Event Parameter accessors.
Human Interface Toolbox 2003-04-03
Capturing Speech Manager Output (HTML) ()
Deprecated - SND15: Capturing the output from the Speech Synthesis Manager to a file.
Music & Audio 1998-05-18
Carbon Full Screen Conundrums (HTML)
QA1068: Describes the available Mac OS X DrawSprocket services.
Games 2001-08-20
CFXML to CFPropertyListRef (and back!) (HTML) ()
QA1208: Describes to how save and restore a CFPropertyListRef to and from an XML file.
Data Management 2003-08-29
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
Games, Graphics & Imaging 2004-09-09
CGContext Bounds (HTML)
QA1048: Explains how to determine the bounds of a CGContext.
Graphics & Imaging, Printing 2001-07-02
CGContext parameter missing in my kEventControlDraw event (HTML) ()
QA1212: Explains in which case your kEventControlDraw handler wouldn't receive a CGContext parameter.
Human Interface Toolbox 2002-11-12
CGContextAddLineToPoint, CGContextAddCurveToPoint, et. al. (HTML)
QA1049: Explains why the CGContextAddXYZ APIs don't draw anything immediately.
Graphics & Imaging, Printing 2001-07-02
CGContextClosePath (HTML)
QA1046: Explains when you should call CGContextClosePath.
Graphics & Imaging, Printing 2001-10-02
CGImageRef contents are immutable (HTML) ()
QA1276: Explains that CGImageRef contents are considered immutable once created.
Graphics & Imaging 2003-07-17
Changing Menu Titles (HTML) ()
TB47: Explains how to change a menu's title after its insertion into the menu bar.
Human Interface Toolbox 1998-12-22
Changing Size of sfnt Cache (HTML) ()
TX11: Describes how to change the size of the sfnt fragment cache.
Typography 1998-04-12
Changing the TCP Window Size (HTML)
NW47: Describes how to change the TCP window size in Open Transport.
Networking, Performance 1997-03-14
Checking for the Printer Driver (HTML)
DV42: Describes a legacy Mac OS technique avoiding system hangs when using serial drivers on USB systems.
Printing 2000-06-19
Clickable Static Text Item (HTML)
QA1380: Explains how to make a static text item respond to clicks
Human Interface Toolbox, User Experience 2004-10-05
Closing the Connection: OpenTransport (HTML) ()
Deprecated - NW20: Describes an orderly disconnect situation in Open Transport between two nodes.
Networking 1996-03-04
Context Sharing Tips (HTML) ()
QA1248: How to correctly share OpenGL contexts and what the limits on this sharing are.
Games, Graphics & Imaging 2003-06-24
Converting RGB Colors to a Palette Index (HTML)
Deprecated - QD21: Explains how to convert RGB colors into the palette index created by an application.
Graphics & Imaging 1995-09-15
Converting Simplified Chinese (HTML) ()
TX06: Describes how to convert Macintosh Simplified Chinese encoding into GB2312.
Text & Fonts 1996-02-09
Converting to Precomposed Unicode (HTML) ()
QA1235: Describes how to convert a string to precomposed Unicode.
Internationalization, Text & Fonts 2003-02-07
Core Audio & Xcode - Ensuring the latest Core Audio Headers are installed (HTML)
QA1386: Describes how to ensure you're working with the latest Core Audio Header files with Xcode.
Music & Audio, Tools 2005-01-18
Correct Setup of an AGLDrawable (HTML)
OGL02: Describes the setup of an AGLDrawable.
Games, Graphics & Imaging 2000-10-04
CreateStaticTextControl fails with paramErr (HTML) ()
QA1211: Explains why CreateStaticTextControl fails with a paramErr in compositing windows and gives a work around.
Human Interface Toolbox 2002-11-12
Creating Double-byte Bitmap Fonts (HTML) ()
TX10: Some information about converting to the 'NFNT' and 'sbit' font formats.
Typography 1998-02-10
Creating Gray Scaled Images > 8 bits (HTML) ()
Deprecated - QD51: Shows how to create gray-scaled images at resolutions greater than 8 bits for display.
Graphics & Imaging, User Experience 1997-11-17
Creating Sub GWorlds using QTNewGWorldFromPtr (HTML)
QA1014: Using QTNewGWorldFromPtr to create sub GWorlds which reference the pixel data of other GWorlds.
QuickTime 2001-03-20
Current GDevice Dependencies (HTML) ()
QA1115: Describes potential problems with creating windows or ports when the current GDevice isn't the main device.
Games, Graphics & Imaging, Porting 2002-02-13
The Data Browser GetDataBrowserUserState API (HTML) ()
QA1270: Explains a problematic Data Browser API definition and how to work around it.
Human Interface Toolbox 2003-07-22
Debugging Graphics with QuartzDebug (HTML) ()
QA1236: Explains how to use QuartzDebug to debug graphics issues.
Graphics & Imaging 2003-02-25
Deselecting Icons in the Finder (HTML) ()
IC04: Shows how to programmatically deselect icons in the Finder.
Interapplication Communication 1997-07-11
Detecting Classic and Carbon X Environments (HTML) ()
OV03: Describes how to find out if your application is running in the Classic environment in Mac OS X.
Porting, Runtime Architecture 2000-10-16
Detecting specific ROM-in-RAM Mac (HTML) ()
Deprecated - HW49: Identifying a Mac by name ("iMac"), and better alternatives for determining specific features ("has Firewire").
Design Guidelines, Runtime Architecture 1999-10-05
Determining if a Drive is a Network Volume (HTML) ()
NW09: Shows how to determine if a volume is mounted over the network.
File Management, Networking 1998-06-01
Determining user login/logout status (HTML)
QA1133: Tells how to determinine if a user is logged in, and how to get login/logout notification
Process Management, Resource Management, Runtime Architecture 2002-04-08
Determining volume size (HTML) ()
FL08: Describes methods of determining volume size and free space under Mac OS.
File Management 1998-09-14
Developing for VFS (HTML) ()
QA1242: Describes Apple's position on developing external file systems (VFS plug-ins) for Mac OS X.
File Management 2003-03-26
DeviceLoop is for drawing (HTML)
QA1024: Warns of one common misuse of the DeviceLoop API and gives two alternative solutions.
Graphics & Imaging, Porting 2001-04-11
Directories Appear as Volume Aliases (HTML)
QA1351: Discusses how VFS plug-ins should handle device numbers to ensure compatibility with Carbon applications.
File Management 2004-05-25
Disabling a Processor on a Multiprocessor System (HTML) ()
QA1141: Describes how to disable a processor on a multiprocessor system for testing purposes.
Performance 2002-05-22
Disconnected aliases on CD-ROM and Alias Manager (HTML)
OPS05: Explains why aliases may become disconnected on a CD-ROM.
File Management 2001-03-26
Discovering all advertised Rendezvous service types (HTML)
QA1337: Explains how to discover all Rendezvous service types being advertised on the local network.
Networking 2004-06-01
dlsDelta field in PRAM's time zone MachineLocation record (HTML) ()
OPS21: Explains how to access and preserve the Daylight Savings state when changing the GMT.
Text & Fonts 2001-03-26
Do I have to call CreateRootControl after creating my window? (HTML) ()
QA1215: Explains when and when not to call CreateRootControl after creating a window.
Human Interface Toolbox 2002-11-12
Don't forget to cancel your Rendezvous resolve (HTML)
QA1297: Explains why it's important to cancel a Rendezvous resolve operation.
Networking 2003-10-15
Downloading through a proxy server in Mac OS X (HTML)
QA1296: Explains when downloading through a proxy server will work, and when it will fail.
Networking 2003-10-29
Drag Manager: Promising and Tracking (HTML) ()
TB43: Explains why you cannot always obtain the promised flavor data in your drag tracking handler.
Human Interface Toolbox 1998-12-22
Drawing a Path Multiple Times (HTML)
QA1047: Explains that path drawing operations consume the path.
Graphics & Imaging, Printing 2001-07-02
Dynamically registering a bundled component (HTML)
QA1083: Describes how to dynamically register a Component which resides in an Application bundle.
Core Foundation, QuickTime 2004-06-07
Ejecting the Volume on Which Your Program Resides (HTML) ()
FL09: Suggests different solutions regarding ejecting a disk on which an application resides.
Data Management, Design Guidelines, File Management, User Experience 1998-07-06
Empty Memory Objects (HTML) ()
QA1259: Describes how two memory management edge cases are handled by the common Mac OS memory allocators.
Accessibility, Data Management 2003-04-21
Enabling the application menu's "Preferences..." menu item on Mac OS X (HTML)
QA1079: Explains how to enable the application menu's "Preferences..." menu item on Mac OS X.
Design Guidelines, Human Interface Toolbox 2001-10-30
Enabling the Navigation Services default behavior in its dialogs (HTML)
QA1384: Explains how to enable the default behavior of the Navigation Services dialogs.
File Management, Human Interface Toolbox 2004-10-15
Environment Variables (HTML)
QA1255: Describes how a process gets its environment variables.
Runtime Architecture 2003-10-29
Error -151 and NewGWorld (HTML)
Deprecated - QD18: Explains what the error code -151 means when in NewGWorld.
Graphics & Imaging, Performance, User Experience 1995-09-15
Error -3168 (kOTStateChangeErr) and Handoff Endpoints (HTML) ()
Deprecated - NW22: Explains why a kOTStateChangeErr -3168 occurs when there is a handoff endpoint involved.
Networking 1996-04-08
Expanding the Set of Menu Item Modifier Keys (HTML) ()
TB53: Explains how to use the shift and option keys with the menu command keys.
Human Interface Toolbox 1998-12-22
Extracting DV Fields using QTNewGWorldFromPtr (HTML)
QA1017: Describes using QTNewGWorldFromPtr to access individual fields contained within a frame of DV source.
QuickTime 2001-03-20
fBroadCastAddr Always Zero (HTML) ()
Deprecated - NW58: Explains why the fBroadcastAddr field may be zero after a call to OTInetGetInterfaceInfo and includes the workaround.
Networking 1999-03-08
File Manager Text Encoding Hints (HTML) ()
QA1223: How to use Text Encoding Hints.
File Management 2003-01-20
Filtering QuickTime media types in Navigation Services (HTML) ()
QA1274: Describes how to filter QuickTime media types in a Navigation Services filter procedure.
Human Interface Toolbox 2003-07-23
Finding Missing OpenGL CFM Entry Points (HTML) ()
QA1225: A resolution to Mac OS X 10.2 OpenGL CFM applications which break under Mac OS X 10.1.
Games, Graphics & Imaging 2002-12-23
Finding your application's directory (HTML)
FL14: Demonstrates finding your application's directory and setting it as the default directory.
File Management 2000-06-19
Fixing the Layout Binding of the Tab control User Panes (HTML)
QA1161: Describes the Tab control hierarchy and layouts of its panes and provides a fix to a common problem.
Human Interface Toolbox 2004-10-14
FSSetCatalogInfo versus UID and GID (HTML) ()
QA1251: Describes why FSSetCatalogInfo does not set the UID and GID of the file, and provides a work around.
File Management 2003-03-26
GetPortBitMapForCopyBits (HTML) ()
Deprecated - QD61: Describes the proper usage of GetPortBitMapForCopyBits.
Graphics & Imaging 2000-11-08
GetProcAdress and OpenGL Entry Points (HTML) ()
QA1188: Technique for finding function pointers for OpenGL entry points in Cocoa and Carbon
Games, Graphics & Imaging 2002-11-25
Getting a Packet Trace (HTML) ()
QA1176: Lists tools available for looking at the network packets on the wire.
Internet & Web, Networking 2004-07-13
Getting the User and Computer Name (HTML)
QA1078: Describes how to get the user and computer name on Mac OS X.
Networking 2001-10-30
grayishTextOr and Mac OS 8.5 (HTML) ()
Deprecated - QD59: Explains why text drawn using TextMode(grayishTextOr) is never drawn; provides a workaround.
Graphics & Imaging 1998-12-07
HID Manager Event Data Underruns (HTML)
QA1038: Explains how to correctly handle HID Manager event queue data underruns.
Apple Applications, User Experience 2001-06-13
HIObjectRegisterSubclass returns paramErr (HTML) ()
QA1213: Explains in which case HIObjectRegisterSubclass would return paramErr and gives a work around.
Human Interface Toolbox 2002-11-12
How can I programmatically determine the DPI of the current video mode? (HTML) ()
QA1217: Describes how to compute the DPI for a given display in a given mode using Core Graphics.
Games, Graphics & Imaging 2002-12-02
How can I set the default location with the modern Navigation APIs NavCreatexxx? (HTML) ()
QA1151: Explains how to set the default location with a NavCustomControl call using the kNavCtlSetLocation message in the Event Proc.
File Management, Human Interface Toolbox 2002-07-01
How do I tell if a particular display is being hardware accelerated by Quartz Extreme? (HTML) ()
QA1218: Describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not.
Games, Graphics & Imaging, Performance 2002-12-04
How do I use kMPCreateTaskSuspendedMask with MPCreateTask? (HTML)
QA1055: Describes how to start a task that has been suspended with the ability to resume it later.
Process Management, Runtime Architecture 2001-07-02
How do I use PMSessionGetGraphicsContext to get a CGContextRef? (HTML) ()
QA1216: Describes how to use PMSessionSetDocumentFormatGeneration and PMSessionGetGraphicsContext to get a CGContextRef for printing.
Graphics & Imaging, Printing 2003-02-25
How do I use QuickDraw with CGDirectDisplay? (HTML)
QA1011: Explains how to draw to a CGDirectDisplay-captured display using QuickDraw.
Games, Graphics & Imaging 2001-04-11